#######################################################################
#							              # 
#                     News Publisher Search Readme                    #
#		   	   Version 1.04                               #
# 	                                                              #
#                    Created by Grant Williams                        # 
#					                              #
# Created on:  1/23/98          Last Modified on:  3/21/99            #
# I can be reached at:          gcw07@ionet.net                       #
# Scripts Found at:             http://www.roosh.com/news_publisher/  #
#######################################################################
# Please use the forum at the site for support questions and not      #
# email them. The forum is checked often.	                      #
#######################################################################
# COPYRIGHT NOTICE:						      #
# 								      #
# Copyright 1999 Grant Williams    All Rights Reserved.               #
#								      #
# This program may be used and modified free of charge by anyone, as  #
# long as this copyright notice and the header above remain intact.   #  
# By using this program you agree to indemnify Grant Williams from    #
# any liability that might arise from it's use.                       #
#								      #
# Selling the code for this program without prior written consent is  #
# expressly forbidden. Obtain permission before redistributing this   #
# software over the Internet or in any other medium.  In all cases    #
# copyright and header must remain intact.                            #
#                                                                     #
#######################################################################

____________________________________________________________________________


You will also need to edit the search.cgi file to install to this script.
Below is a description of how to modify the necessary file. This script
is an add-on and is not required to run the news.cgi script.

_________________________________________________________________________

                      CONFIG.CGI SEARCH CONFIGURATION
		     ================================

This file must be placed in your server's cgi-bin, or if your server has 
.cgi extensions allowed, you can simply rename this file to config.cgi. This
file must be chmoded 755. Ask your system administrator for more information 
on either the cgi-bin or chmod command.

This file will be pretty easy to modify, if you already modified the 
config.cgi file for the news script. Below is a summary of how to configure 
all of the variables:

###########################################################################
# Define Variables


$SearchScriptUrl = "http://your.host.xxx/cgi-bin/search.cgi";
	This is the URL that points to search.cgi. This will be used often
	in the search.cgi file, so this must be correct. If you renamed 
	search.cgi to search.pl, be sure to change the $SearchScriptUrl 
	to reflect this change.

$beforeForm = "<center>";
	This is what you want before the search form.

$afterForm = "</center>";
	This is what you want after the search form. 

$beforeSearch = "<FONT COLOR=\"#046CB4\">";
	This is what you want before the searched for keywords. So if you 
	searched for 'news publisher', then it would place this before the
	keyword like this: '<FONT COLOR=\"#046CB4\">news publisher'. YOU
	MUST HAVE A BACKSLASH ( \ ) BEFORE ALL QUOTES ( " ). OTHERWISE IT
	WILL GIVE AN ERROR.

$afterSearch = "</FONT>";
	This is what you want after the searched for keywords. So if you 
	searched for 'news publisher', then it would place this after the
	keyword like this: 'news publisher</FONT>'. YOU MUST HAVE A 
	BACKSLASH ( \ ) BEFORE ALL QUOTES ( " ). OTHERWISE IT WILL GIVE 
	AN ERROR.

$perpagedisplay = 10;
	This is the number of found results that you want on the same page.
	So if you have this as 10, ten results will be shown at a time on
	the search results page.

   ############ CONTINUE IN THE OTHER CONFIGURATION PART ############

$pageheader = "/path/to/datadirectory/pageheader.txt";
	This is the HTML that you want before the search results. So you
	can place any HTML in this file. All of it will show up above the
	search results.

$pagefooter = "/path/to/datadirectory/pagefooter.txt";
	This is the HTML that you want after the search results. So you
	can place any HTML in this file. All of it will show up below the
	search results.

##########################################################################

The CGI is now ready to upload. Now onto the second part of configuration.
You must also configure the search.cgi script, but it is very easy.

First make sure the perl location at the top is correct. Then scroll down to
this line:

require 'config.cgi';

If you did not rename config.cgi to anything else you do not have to change
anything. If you did rename it change the name so that it points to the
config.cgi file. This file must be placed in your server's cgi-bin, like the
config.cgi script was. This file must be chmoded 755. Ask your system 
administrator for more information on either the cgi-bin or chmod command.


##########################################################################
Now how to call it from a web page. You need to place the following code
somewhere in your HTML page:

<FORM ACTION="$scripturl" METHOD="GET">
<input type="hidden" name="category" value="1">
<INPUT TYPE="text" NAME="keyword" SIZE="20" MAXSIZE="30">
<INPUT TYPE="submit" value="Search">
</FORM>

$scripturl should be the same thing as what you have in the above section.
so it will be something like:

http://your.host.xxx/cgi-bin/search.cgi

If you need to search a different category change the following line:

<input type="hidden" name="category" value="{category name here}">

To search through all the category {category name here} should be set to
"all".

To allow the user to select a category to search place this in:

<select name="category">
<option value="all">All Categories
<option value="1">Category 1 Name
<option value="2">Category 2 Name
<option value="3">Category 3 Name
</select>

However you choose to do it, the hidden category field MUST be ABOVE the keyword 
field.

Everything else needs to stay the same. You can edit it, but edit at your
own risk.

